home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-06-22 | 24.5 KB | 803 lines | [TEXT/KAHL] |
- /* PredatorPrey.h */
- //#define testPrey
-
- #ifndef __C14__
- #define __C14__
-
- #ifdef _DECLAIR
- #define EXTERN
- #else
- #define EXTERN extern
- #endif
-
- #define quiet
- #define runfast TRUE
- #define fast TRUE
- #define DEBUGGING TRUE
- #define debugPers FALSE
- //#define debugPers TRUE
-
- //#include <SANE.h>
- //#include <math.h>
- #include <fp.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- /*#ifndef __H_Lists*/
- /*#define __H_Lists*/
-
- /*#include <Lists.h>*/
-
- /*#endif*/
-
- /* #include <FileMgr.h> */
- #include <StandardFile.h>
- #include <errno.h>
- #include <Printing.h>
- #include <Windows.h>
- #include <Sound.h>
- #include "calc_wizard.h"
- /*#include "PredatorPreyData.h"*/
- /*#include "AEvent.h"*/
- /* progLimit used in SearchLabel and nowhere else */
- #define progLimit 448 /* magic number, maximum number of program steps */
- #define NIL 0L /* could also be written "0x00000000" */
- #define NIL_STRING "\p"
- #define windMax 16
-
- #define H_RPAGE_DEFAULT 640
- #define V_RPAGE_DEFAULT 752
-
- #define UNIMPLEMENTED 0xA89F /* A-trap code for unimplemented function */
- #define BASE_RES_ID 400
-
- #define FILE_OPEN 415
- #define NO_FILE 416
- #define SPLASH_SCREEN 415
- #define SHR_SCRN 416
- #define WIZ_SCRN 417
- #define PASS_SCRN 418
- #define PASS_SCRN2 432
- #define NOT_GRAPHICS_WINDOW 419
- #define NO_STRETCH_DIALOG 420
- #define NO_ROTATE_DIALOG 425
- #define NO_ROTATION_BOX 426
- #define NO_STRETCH_BOX 427
- #define UNDER_CONSTRUCTION 428
- #define NOT_A_WIZARD 430
- #define COPY_REG_NO 431
- #define NO_SOLVE_YET 432
- #define NO_MATRIX_INVERSION 433
- #define NO_INTEGRATION 434
- #define GET_SOLVE_DATA 435
- #define MAT_DIV_UNDEF 436
- #define NOT_SQUARE 437
-
-
- #define WRITE_ERR 256
- #define CREATE_ERR 257
- #define OPEN_ERR 258
- #define READ_ERR 259
- #define SAVE_CHANGES 260
-
- #define SUCCESS 0 /* save_file() return codes */
- #define CANCELED 1
- #define FILE_ERROR -1
-
- #define CREATOR_CODE 'INRS'
- #define TYPE_CODE 'INRG'
-
- #define SAVE_YES 1
- #define SAVE_CANCEL 2
- #define SAVE_NO 3
-
- #define DO_SAVE 1
- #define DO_SFPUT 2
-
- #define SAVE_ID 9001
- #define AS_ID 9002
-
- /* ICON resources ID nos. */
-
- #define L_SNOOPY_ID 128
- #define R_SNOOPY_ID 129
- #define FIRST_CALC_ID 130
- #define SECOND_CALC_ID 131
- #define THIRD_CALC_ID 132
- #define FOURTH_CALC_ID 133
- #define FIFTH_CALC_ID 134
- #define SIXTH_CALC_ID 135
-
- #define ARROW_ID 2001
- #define CIRCLE_ID 2002
- #define SQUARE_ID 2003
- #define CUBE_ID 2004
- #define HOUSE_ID 2005
- #define BACKGRND_ID 2006
- #define GUNS_ID 2007
- #define MISSLES_ID 2008
- #define N_BOMB_ID 2009
- #define ZERO_ID 2010
- #define ONE_ID 2011
- #define TWO_ID 2012
- #define THREE_ID 2013
- #define FOUR_ID 2014
- #define FIVE_ID 2015
- #define SIX_ID 2016
-
- #define ROT_X_ID 3001
- #define ROT_X_ID_DOWN 3011
- #define ROT_Y_ID 3002
- #define ROT_Y_ID_DOWN 3012
- #define ROT_Z_ID 3003
- #define ROT_Z_ID_DOWN 3013
-
- #define NEG_ROT_X_ID 3101
- #define NEG_ROT_X_ID_DN 3111
- #define NEG_ROT_Y_ID 3102
- #define NEG_ROT_Y_ID_DN 3112
- #define NEG_ROT_Z_ID 3103
- #define NEG_ROT_Z_ID_DN 3113
- #define DO_MANY_ROT_BOX_ID 3200
- #define DO_MANY_ROT_BOX_ID_DN 3201
-
- #define STR_X_ID 4001
- #define STR_X_ID_DOWN 4011
- #define STR_Y_ID 4002
- #define STR_Y_ID_DOWN 4012
- #define STR_Z_ID 4003
- #define STR_Z_ID_DOWN 4013
-
- #define NEG_STR_X_ID 4101
- #define NEG_STR_X_ID_DN 4111
- #define NEG_STR_Y_ID 4102
- #define NEG_STR_Y_ID_DN 4112
- #define NEG_STR_Z_ID 4103
- #define NEG_STR_Z_ID_DN 4113
-
- #define ROT_LEFT_ID 5001
- #define ROT_LEFT_ID_DN 5011
- #define ROT_RT_ID 5002
- #define ROT_RT_ID_DN 5012
- #define ROT_UP_ID 5003
- #define ROT_UP_ID_DN 5013
- #define ROT_DN_ID 5004
- #define ROT_DN_ID_DN 5014
- #define MOVE_IN_ID 5005
- #define MOVE_IN_ID_DN 5015
- #define MOVE_OUT_ID 5006
- #define MOVE_OUT_ID_DN 5016
- #define PITCH_UP_ID 5100
- #define PITCH_UP_ID_DN 5110
- #define PITCH_DN_ID 5101
- #define PITCH_DN_ID_DN 5111
- #define YAW_LFT_ID 5102
- #define YAW_LFT_ID_DN 5112
- #define YAW_RT_ID 5103
- #define YAW_RT_ID_DN 5113
- #define BANK_LFT_ID 5104
- #define BANK_LFT_ID_DN 5114
- #define BANK_RT_ID 5105
- #define BANK_RT_ID_DN 5115
-
- #define NIL_POINTER 0L
- #define NIL_PTR 0L
-
- #define MOVE_TO_FRONT -1L
- #define REMOVE_ALL_EVENTS 0
-
- #define HORIZONTAL_PIXEL 64
- #define VERTICAL_PIXEL 42/*47*/
- #define NHORIZONTAL_PIXEL HORIZONTAL_PIXEL
- #define NVERTICAL_PIXEL VERTICAL_PIXEL - 22
- #define H_PIX HORIZONTAL_PIXEL
- #define NH_PIX HORIZONTAL_PIXEL
- #define V_PIX VERTICAL_PIXEL
- #define NV_PIX VERTICAL_PIXEL - 22
-
- #define SCROLLBAR_ID 1000
-
- #define SCROLL_UP -1
- #define SCROLL_DOWN 1
-
-
- #define SLEEP 0L
- #define NIL_MOUSE_REGION 0L
- #define WNE_TRAP_NUM 0x60
- #define UNIMPL_TRAP_NUM 0x9F
- #define SUSPEND_RESUME_BIT 0x0001
-
- /* menu & menu_item ID's */
-
- #define APPLE_MENU_ID BASE_RES_ID /* 400 */
- #define FILE_MENU_ID BASE_RES_ID+1
- #define EDIT_MENU_ID BASE_RES_ID+2
- #define GRAPHICS_MENU_ID BASE_RES_ID+5
- #define DORK_MENU_ID BASE_RES_ID+6
- //#define PLOT_MENU_ID BASE_RES_ID+7
- #define GRAPHICS_SUBMENU_ID 100
-
- #define ABOUT_ITEM_ID 1
- #define HELP_ITEM 2
- #define ALT_HELP_ITEM 3
- #define OPEN_DATA_FILE_ITEM 1
- #define SAVE_DATA_FILE_ITEM 2
- #define CLOSE_ITEM 3
- #define QUIT_ITEM 4
- #define NEW_GRAPHICS_WINDOW 1
- #define OPEN_GRAPHICS_WINDOW 1
- #define ROTATION_BOX 1
- #define STRETCH_BOX 2
- /*#define ROTATE_CUBE 4*/
- /*#define STRETCH_CUBE 5*/
-
-
- #define BTN_TOP 95
- #define BTN_LFT 29
- #define NBTN_TOP 52
- #define NBTN_LFT 6
-
- #define ON 1
- #define OFF 0
-
- //#define TRUE 1
- //#define FALSE 0
- #define ONE_BUTTON 1
- #define TWO_BUTTON 2
- #define THREE_BUTTON 3
- #define FOUR_BUTTON 4
- #define FIVE_BUTTON 5
- #define SIX_BUTTON 6
- #define SEVEN_BUTTON 7
- #define EIGHT_BUTTON 8
- #define NINE_BUTTON 9
- #define ZERO_BUTTON 10
- #define PLUS_BUTTON 11
- #define MINUS_BUTTON 12
- #define TIMES_BUTTON 13
- #define DIVIDE_BUTTON 14
- #define RCL_BUTTON 15
- #define ENTER_BUTTON 16
- #define DECIMAL_BUTTON 17
- #define ERASE_BUTTON 18
- #define SUM_BUTTON 19
- #define TENTOX_BUTTON 20
- #define ETOX_BUTTON 21
- #define YTOX_BUTTON 22
- #define INVERSE_BUTTON 23
- #define SIN_BUTTON 24
- #define COS_BUTTON 25
- #define TAN_BUTTON 26
- #define GTO_BUTTON 27
- #define GSB_BUTTON 28
- #define ROLLDN_BUTTON 29
- #define EEX_BUTTON 30
- #define SST_BUTTON 31
- #define RUNSTOP_BUTTON 32
- #define FFXN_BUTTON 33
- #define GFXN_BUTTON 34
- #define ON_BUTTON 35
- #define STO_BUTTON 36
- #define EXCHXY_BUTTON 37
- #define CHS_BUTTON 38
- #define SQRT_BUTTON 39
-
- #define MT 0x00 /* 0x00; /* MT */ /* 00 */
- #define SQRT_CODE 0x0B /* 0x0B; /* SQRT_CODE */ /* 11 */
- #define ETOX_CODE 0x0C /* 0x0C; /* ETOX_CODE */ /* 12 */
- #define TENTOX_CODE 0x0D /* 0x0D; /* TENTOX_CODE */ /* 13 */
- #define YTOX_CODE 0x0E /* 0x0E; /* YTOX_CODE */ /* 14 */
- #define INVERSE_CODE 0x0F /* 0x0F; /* INVERSE_CODE */ /* 15 */
- #define CHS_CODE 0x10 /* 0x10; /* CHS_CODE */ /* 16 */
- #define SEVEN_CODE 0x11 /* 0x11; /* SEVEN_CODE */ /* 17 */
- #define EIGHT_CODE 0x12 /* 0x12; /* EIGHT_CODE */ /* 18 */
- #define NINE_CODE 0x13 /* 0x13; /* NINE_CODE */ /* 19 */
- #define DIVIDE_CODE 0x0A /* 0x0A; /* DIVIDE_CODE */ /* 10 */
-
- #define SST_CODE 0x15 /* 0x15; /* SST_CODE */ /* 21 */
- #define GTO_CODE 0x16 /* 0x16; /* GTO_CODE */ /* 22 */
- #define SIN_CODE 0x17 /* 0x17; /* SIN_CODE */ /* 23 */
- #define COS_CODE 0x18 /* 0x18; /* COS_CODE */ /* 24 */
- #define TAN_CODE 0x19 /* 0x19; /* TAN_CODE */ /* 25 */
- #define EEX_CODE 0x1A /* 0x1A; /* EEX_CODE */ /* 26 */
- #define FOUR_CODE 0x1B /* 0x1B; /* FOUR_CODE */ /* 27 */
- #define FIVE_CODE 0x1C /* 0x1C; /* FIVE_CODE */ /* 28 */
- #define SIX_CODE 0x1D /* 0x1D; /* SIX_CODE */ /* 29 */
- #define TIMES_CODE 0x14 /* 0x14; /* TIMES_CODE */ /* 20 */
-
- #define RUNSTOP_CODE 0x1F /* 0x1F; /* RUNSTOP_CODE */ /* 31 */
- #define GSB_CODE 0x20 /* 0x20; /* GSB_CODE */ /* 32 */
- #define ROLLDN_CODE 0x21 /* 0x21; /* ROLLDN_CODE */ /* 33 */
- #define EXCHXY_CODE 0x22 /* 0x22; /* EXCHXY_CODE */ /* 34 */
- #define ERASE_CODE 0x23 /* 0x23; /* ERASE_CODE */ /* 35 */
- #define ENTER_CODE 0x24 /* 0x24; /* ENTER_CODE */ /* 36 */
- #define ONE_CODE 0x25 /* 0x25; /* ONE_CODE */ /* 37 */
- #define TWO_CODE 0x26 /* 0x26; /* TWO_CODE */ /* 38 */
- #define THREE_CODE 0x27 /* 0x27; /* THREE_CODE */ /* 39 */
- #define MINUS_CODE 0x1E /* 0x1E; /* MINUS_CODE */ /* 30 */
-
- #define ON_CODE 0x29 /* 0x29; /* ON_CODE */ /* 41 */
- #define FFXN_CODE 0x2A /* 0x2A; /* FFXN_CODE */ /* 42 */
- #define GFXN_CODE 0x2B /* 0x2B; /* GFXN_CODE */ /* 43 */
- #define STO_CODE 0x2C /* 0x2C; /* STO_CODE */ /* 44 */
- #define RCL_CODE 0x2D /* 0x2D; /* RCL_CODE */ /* 45 */
- #define ZERO_CODE 0x2F /* 0x2F; /* ZERO_CODE */ /* 47 */
- #define DECIMAL_CODE 0x30 /* 0x30; /* DECIMAL_CODE */ /* 48 */
- #define SUM_CODE 0x31 /* 0x31; /* SUM_CODE */ /* 49 */
- #define PLUS_CODE 0x28 /* 0x28; /* PLUS_CODE */ /* 40 */
-
-
-
-
- #define SYS_VERSION 1
- #define TEXT_FONT_SIZE 9
- #define NO_PICTURE BASE_RES_ID+2
-
- #define DRAG_THRESHOLD 30
- #define MIN_WINDOW_HEIGHT 50
- #define MIN_WINDOW_WIDTH 50
- #define SCROLL_BAR_PIXELS 16
-
- //#define ours(w) ((gCalcWindow != NULL) && (w == gCalcWindow)) || ((gNewCalcWindow != NULL) && (w == gNewCalcWindow)) || ((gIconizeWindow != NULL) && (w == gIconizeWindow))
-
- #define windMax 16
- #define windTEHMax 12
- #define windCntlHMax 8
-
-
- /****************** Windows and Contents ******************/
-
- #define WINDOW_ID 2000
- #define ROTATION_BOX_ID 2001
- #define STRETCH_BOX_ID 2002
- #define W_TITLE_ID 1000
- #define P_TITLE_ID 1001
-
-
- #define MY_WINDOW_MAX 5
-
- #define OBJECT_SIZE 25
- #define HSE_OBJ_SIZE 40
- #define A_HSE_OBJ_SIZE 40
-
- #define OUT_OF_WNDWS 261
- #define OUT_OF_MEM 262
-
- /* Codes for object types */
-
- #define NO_OBJ 0
- #define ARROW_OBJ 1
- #define CIRCLE_OBJ 2
- #define SQUARE_OBJ 3
- #define CUBE_OBJ 4
- #define HOUSE_OBJ 5
- #define PLOT_OBJ 6
- #define BACKGRND_OBJ 7
- #define ARMD_HOUSE3_OBJ 8
- #define ARMD_HOUSE2_OBJ 9
- #define ARMD_HOUSE1_OBJ 10
- #define T_BACKGRND_OBJ 11
- #define BARBIE 12
- #define KEN 13
-
- #define MAX_OBJECTS 30
-
- #define X_ROTATION_BOX 1
- #define Y_ROTATION_BOX 2
- #define Z_ROTATION_BOX 3
- #define NEG_X_ROT_BOX 4
- #define NEG_Y_ROT_BOX 5
- #define NEG_Z_ROT_BOX 6
- #define X_ROT_TEXT_BOX 7
- #define Y_ROT_TEXT_BOX 8
- #define Z_ROT_TEXT_BOX 9
- #define ROTATION_OK_BOX 10
- #define ROT_CANCEL_BOX 11
- #define DO_MANY_ROT_BOX 12
-
- #define DO_ROT_LEFT_BOX 13
- #define DO_ROT_RT_BOX 14
- #define DO_ROT_UP_BOX 15
- #define DO_ROT_DN_BOX 16
- #define DO_MOVE_IN_BOX 17
- #define DO_MOVE_OUT_BOX 18
- #define DO_PITCH_UP_BOX 19
- #define DO_PITCH_DN_BOX 20
- #define DO_YAW_LFT_BOX 21
- #define DO_YAW_RT_BOX 22
- #define DO_BANK_LFT_BOX 23
- #define DO_BANK_RT_BOX 24
-
- #define X_STRETCH_BOX 1
- #define Y_STRETCH_BOX 2
- #define Z_STRETCH_BOX 3
- #define NEG_X_STR_BOX 4
- #define NEG_Y_STR_BOX 5
- #define NEG_Z_STR_BOX 6
- #define X_STR_TEXT_BOX 7
- #define Y_STR_TEXT_BOX 8
- #define Z_STR_TEXT_BOX 9
- #define STRETCH_OK_BOX 10
- #define STR_CANCEL_BOX 11
-
- #define NON_SELECTED 1
- #define SELECTED 2
- #define GROW_BOX 3
-
- #define DOC_LENGTH 700 /* 400 pixels in length */
- #define DOC_WIDTH 720
-
- #define H_MIN_SIZE 50
- #define V_MIN_SIZE 100
-
-
- EXTERN Point theNoColorPoint;
- EXTERN Point theTmNoColorPoint;
- EXTERN RgnHandle gray_rgn;
- EXTERN PicHandle gSkullPicture30;
- EXTERN PicHandle gSkullPicture35;
- EXTERN PicHandle gSkullPicture40;
- EXTERN PicHandle gSkullPicture45;
- EXTERN PicHandle gSkullPicture50;
- EXTERN PicHandle gSkullPicture55;
- EXTERN PicHandle gSkullPicture60;
- EXTERN PicHandle gSkullPicture65;
- EXTERN PicHandle gSkullPicture70;
- EXTERN PicHandle gSkullPicture75;
- EXTERN PicHandle gSkullPicture80;
- EXTERN PicHandle gSkullPicture85;
- EXTERN PicHandle gSkullPicture90;
- EXTERN PicHandle gSkullPicture95;
- EXTERN PicHandle gSkullPicture100;
- EXTERN PicHandle gCalcPicture;
- EXTERN PicHandle gIconizePicture;
- EXTERN PicHandle gColorPicture;
- EXTERN PicHandle gNewColorPicture;
- EXTERN PicHandle gNewCalcPicture;
- EXTERN PicHandle gUserPicture;
- EXTERN PicHandle gRADPicture;
- EXTERN PicHandle gGRADPicture;
- EXTERN PicHandle gPrgmPicture;
- EXTERN PicHandle gFPicture;
- EXTERN PicHandle gGPicture;
- EXTERN PicHandle gCPicture;
- //EXTERN WindowPtr gIconizeWindow;
- //EXTERN WindowPtr gCalcWindow;
- //EXTERN WindowPtr gNewCalcWindow;
- EXTERN WindowPtr gGraphicsWindow;
- EXTERN WindowPtr gMatAWindow;
- EXTERN WindowPtr gMatBWindow;
- EXTERN WindowPtr gMatCWindow;
- EXTERN WindowPtr gMatDWindow;
- EXTERN WindowPtr gMatEWindow;
- EXTERN WindowPtr gSRegWindow;
- EXTERN WindowPtr gProgWindow;
- EXTERN WindowPtr gRotateBox;
- EXTERN WindowPtr gStretchBox;
- EXTERN ListHandle matAList;
- EXTERN ListHandle matBList;
- EXTERN ListHandle matCList;
- EXTERN ListHandle matDList;
- EXTERN ListHandle matEList;
- EXTERN ListHandle SRegListn1;
- EXTERN ListHandle SRegListd1;
- EXTERN ListHandle SRegListn2;
- EXTERN ListHandle SRegListd2;
- EXTERN ListHandle SRegListn3;
- EXTERN ListHandle SRegListd3;
- EXTERN ListHandle SRegListn4;
- EXTERN ListHandle SRegListd4;
- EXTERN ListHandle progList;
- EXTERN Boolean gDone, gWNEImplemented, gHasPoint;
- EXTERN EventRecord gTheEvent;
- /*EXTERN MenuHandle gAppleMenu, gFileMenu, gWindowMenu, gProgMenu, gGraphMenu,gDorkMenu;*/
- EXTERN short gCurRow, gMaxRow;
- EXTERN short gFormatFlag;
- EXTERN Rect gDragRect,gNoColorDragRect,gSizeRect;
- EXTERN Rect gFRect,gNFRect,gGRect,gNGRect,gPrgmRect,gNPrgmRect;
- EXTERN Rect gUserRect,gNUserRect;
- EXTERN Rect gRADRect,gNRADRect;
- EXTERN Rect gGRADRect,gNGRADRect;
- EXTERN Rect gCRect,gNCRect;
-
- EXTERN char gDisplayString[12];
- //EXTERN char gDisplayString[];
- EXTERN char *endptr;
- EXTERN char gResultString[11];
- EXTERN char gIndexString[3];
- EXTERN char gMemDisplayString[11];
- EXTERN char gMatrixElement[8];
- EXTERN char gMatrixString[11];
- EXTERN char gErrorString[11];
- EXTERN char gNullStr[11];
-
- EXTERN short gStrCnt;
- EXTERN double gNum[10];
- EXTERN unsigned long qRan;
- //EXTERN extended rRan;
- //EXTERN extended qTemp,sTemp;
- EXTERN double M,N,P;
-
- /*EXTERN short gResultMatrix;*/
-
- EXTERN Rect gBlankRect; /* Rect Data Type: IM: I-141 */
- EXTERN Rect gNBlankRect;
- EXTERN decform gF;
- EXTERN Rect gDisplayRect,gHPRect,g1499Rect,gTestRect;
- EXTERN Rect gSkullRect30,gSkullRect35,gSkullRect40,gSkullRect45,gSkullRect50;
- EXTERN Rect gSkullRect55,gSkullRect60,gSkullRect65,gSkullRect70,gSkullRect75;
- EXTERN Rect gSkullRect80,gSkullRect85,gSkullRect90,gSkullRect95,gSkullRect100;
- EXTERN Rect gZeroRect,gOneRect,gTwoRect,gThreeRect,gFourRect,gFiveRect;
- EXTERN Rect gSixRect,gSevenRect,gEightRect,gNineRect;
- EXTERN Rect gPointRect,gPlusRect,gMinusRect,gTimesRect,gDivideRect;
- EXTERN Rect gEnterRect,gSumRect,gChsRect,gEexRect,gInversRect;
- EXTERN Rect gTanRect,gEraseRect,gRclRect,gYtoXRect,gCosRect;
- EXTERN Rect gExchXYRect,gStoRect,g10toXRect,gSinRect,gRollDnRect;
- EXTERN Rect gGfxnRect,gFfxnRect,gEtoXRect,gGtoRect,gGsbRect;
- EXTERN Rect gSqrtRect,gSstRect,gRunStopRect,gOnRect;
-
- EXTERN Rect gNDisplayRect,gNHPRect;
- EXTERN Rect gNZeroRect,gNOneRect,gNTwoRect,gNThreeRect,gNFourRect,gNFiveRect;
- EXTERN Rect gNSixRect,gNSevenRect,gNEightRect,gNNineRect;
- EXTERN Rect gNPointRect,gNPlusRect,gNMinusRect,gNTimesRect,gNDivideRect;
- EXTERN Rect gNEnterRect,gNSumRect,gNChsRect,gNEexRect,gNInversRect;
- EXTERN Rect gNTanRect,gNEraseRect,gNRclRect,gNYtoXRect,gNCosRect;
- EXTERN Rect gNExchXYRect,gNStoRect,gN10toXRect,gNSinRect,gNRollDnRect;
- EXTERN Rect gNGfxnRect,gNFfxnRect,gNEtoXRect,gNGtoRect,gNGsbRect;
- EXTERN Rect gNSqrtRect,gNSstRect,gNRunStopRect,gNOnRect;
-
- EXTERN Rect hDisplayRect,hHPRect,hfZeroRect,hZeroRect,hgZeroRect;
- EXTERN Rect hfOneRect,hOneRect,hgOneRect,hfTwoRect,hTwoRect,hgTwoRect;
- EXTERN Rect hfThreeRect,hThreeRect,hgThreeRect,hfFourRect,hFourRect,hgFourRect;
- EXTERN Rect hfFiveRect,hFiveRect,hgFiveRect,hfSixRect,hSixRect,hgSixRect;
- EXTERN Rect hfSevenRect,hSevenRect,hgSevenRect,hfEightRect,hEightRect,hgEightRect;
- EXTERN Rect hfNineRect,hNineRect,hgNineRect,hfPointRect,hPointRect,hgPointRect;
- EXTERN Rect hfPlusRect,hPlusRect,hgPlusRect,hfMinusRect,hMinusRect,hgMinusRect;
- EXTERN Rect hfTimesRect,hTimesRect,hgTimesRect,hfDivideRect,hDivideRect,hgDivideRect;
- EXTERN Rect hfEnterRect,hEnterRect,hgEnterRect,hfSumRect,hSumRect,hgSumRect;
- EXTERN Rect hfChsRect,hChsRect,hgChsRect,hfEexRect,hEexRect,hgEexRect;
- EXTERN Rect hfInversRect,hInversRect,hgInversRect,hfTanRect,hTanRect,hgTanRect;
- EXTERN Rect hfEraseRect,hEraseRect,hgEraseRect,hfRclRect,hRclRect,hgRclRect;
- EXTERN Rect hfYtoXRect,hYtoXRect,hgYtoXRect,hfCosRect,hCosRect,hgCosRect;
- EXTERN Rect hfExchXYRect,hExchXYRect,hgExchXYRect,hfStoRect,hStoRect,hgStoRect;
- EXTERN Rect hf10toXRect,h10toXRect,hg10toXRect,hfSinRect,hSinRect,hgSinRect;
- EXTERN Rect hfRollDnRect,hRollDnRect,hgRollDnRect,hOnRect,hGfxnRect,hFfxnRect;
- EXTERN Rect hfEtoXRect,hEtoXRect,hgEtoXRect,hfGtoRect,hGtoRect,hgGtoRect;
- EXTERN Rect hfGsbRect,hGsbRect,hgGsbRect,hfSqrtRect,hSqrtRect,hgSqrtRect;
- EXTERN Rect hfSstRect,hSstRect,hgSstRect,hfRunStopRect,hRunStopRect,hgRunStopRect;
- EXTERN Rect hFRect,hGRect,hPrgmRect,hCRect,hUserRect,hRADRect,hGRADRect;
-
- EXTERN Rect gHelpNot1_01,gHelpNot1_02,gHelpNot1_03,gHelpNot1_04,gHelpNot1_05;
- EXTERN Rect gHelpNot1_06,gHelpNot1_07,gHelpNot1_08,gHelpNot1_09,gHelpNot1_10;
- EXTERN Rect gHelpNot1_11,gHelpNot1_12,gHelpNot1_13,gHelpNot1_14,gHelpNot1_15;
- EXTERN Rect gHelpNot1_16,gHelpNot1_17,gHelpNot1_18,gHelpNot1_19,gHelpNot1_20;
- EXTERN Rect gHelpNot1_21,gHelpNot1_22,gHelpNot1_23,gHelpNot1_24,gHelpNot1_25;
- EXTERN Rect gHelpNot1_26,gHelpNot1_27,gHelpNot1_28,gHelpNot1_29,gHelpNot1_30;
- EXTERN Rect gHelpNot1_31,gHelpNot1_32,gHelpNot1_33,gHelpNot1_34,gHelpNot1_35;
- EXTERN Rect gHelpNot1_36;
-
- EXTERN Rect gHelpNot2_01,gHelpNot2_02,gHelpNot2_03,gHelpNot2_04,gHelpNot2_05;
- EXTERN Rect gHelpNot2_06,gHelpNot2_07,gHelpNot2_08,gHelpNot2_09,gHelpNot2_10;
- EXTERN Rect gHelpNot2_11,gHelpNot2_12,gHelpNot2_13,gHelpNot2_14,gHelpNot2_15;
- EXTERN Rect gHelpNot2_16,gHelpNot2_17,gHelpNot2_18,gHelpNot2_19,gHelpNot2_20;
- EXTERN Rect gHelpNot2_21,gHelpNot2_22,gHelpNot2_23,gHelpNot2_24,gHelpNot2_25;
- EXTERN Rect gHelpNot2_26,gHelpNot2_27,gHelpNot2_28,gHelpNot2_29,gHelpNot2_30;
- EXTERN Rect gHelpNot2_31,gHelpNot2_32,gHelpNot2_33,gHelpNot2_34,gHelpNot2_35;
- EXTERN Rect gHelpNot2_36;
-
-
- /* struct defs */
-
-
-
- typedef struct
- {
- Str255 Field4Text;
- Str255 Field6Text;
- Str255 Field8Text;
-
- } ShareRec, *ShareRecPtr;
-
-
- struct _3dPtStrk
- {
- long x_point;
- long y_point;
- long z_point;
- long no_point;
- };
- EXTERN struct _3dPtStrk _3dPt[18], _3dPtH[18];
- /****************************************************/
- struct _3dPtStrk_BG
- {
- long x_point;
- long y_point;
- long z_point;
- long no_point;
- };
- EXTERN struct _3dPtStrk_BG _3dPt_BG[70], _3dPtH_BG[70], gXYZplane;
- /****************************************************/
- struct vRvector
- {
- double vectElem[4];
- };
- EXTERN struct vRvector;
- /****************************************************/
- struct rotstruk
- {
- double rotElem;
- };
- EXTERN struct rotstruk rotHist[4][4];
- /****************************************************/
- struct msStruct
- {
- Rect mRect;
- };
- EXTERN struct msStruct mStruct[14];
- /****************************************************/
- struct sndStruct
- {
- SndChannelPtr Chan00;
- };
- EXTERN struct sndStruct sndStruct[10];
- /****************************************************/
- typedef struct
- {
- Rect bounds; /* obj_rect */
- short type; /* objType */
- short missles;
- Boolean selected;
- Boolean armed;
- struct _3dPtStrk _3dPtH[22]; /* creation coordinates */
- struct _3dPtStrk _3dPt[22];
- struct rotstruk rotHist[4][4];
- struct msStruct mStruct[14];
- struct sndStruct sndStruct[10];
- PolyHandle thePoly[6];
- PixPatHandle thePPat[6];
- } objectDescr;
- /****************************************************/
- typedef struct
- {
- Rect bounds; /* obj_rect */
- short type; /* objType */
- Boolean selected;
- Boolean hasTargets;
- Boolean alive;
- struct _3dPtStrk_BG _3dPtH_BG[8]; /* creation coordinates */
- struct _3dPtStrk_BG _3dPt_BG[8];
- struct rotstruk rotHist[4][4];
- long z_reg;
- short max_pts;
- PolyHandle thePoly[6];
- PixPatHandle thePPat[6];
- } objectDescr_BG;
- /****************************************************/
- typedef struct /** contains info needed to specify each window's contents **/
- {
- THPrint prInfoHndl;
- Boolean dirty;
- Boolean hasRealName;
- Boolean hasBackGround;
- Boolean isArmed;
- short targets_left;
- short armament_type; /* 0 = guns, 1 = guns & missles, 2 = guns, missles & neutron bomb */
- short arms_selected; /* 0 = guns, 1 = missles, 2 = neutron bomb */
- Boolean hasTargets;
- SFReply findFile;
- Point scrollAmount;
- ControlHandle myVCntrlHdl; /* verticle scroll bar */
- ControlHandle myHCntrlHdl; /* horizontal scroll bar */
- short vDocLimit;
- short hDocLimit;
- TPrint printInfo;
- short paletteSetting;
- short vPtNo;
- long focalLn;
- long xvPt;
- long yvPt;
- short focalPtNo;
- short isPrey;
- struct _3dPtStrk_BG gXYZplane;
- objectDescr_BG bg_object[22]; /* 22 is OK */
- objectDescr object[MAX_OBJECTS]; /* objDescr */ /* MAX_OBJECTS happens to be 30 */
- } WObjs, **WObjsHandle;
- /****************************************************/
- typedef struct /** contains info needed to specify prog window's contents **/
- {
- THPrint prInfoHndl;
- Boolean dirty;
- Boolean hasRealName;
- SFReply findFile;
- Point scrollAmount;
- ControlHandle myVCntrlHdl; /* verticle scroll bar */
- short vDocLimit;
- short hDocLimit;
- TPrint printInfo;
- } WPObjs, **WPObjsHandle;
- /****************************************************/
- typedef struct /** contains info needed to specify each str box window's contents **/
- {
- Boolean dirty;
- Boolean hasRealName;
- double xDir;
- double yDir;
- double zDir;
- short paletteSetting;
- } WSObjs, **WSObjsHandle;
- /****************************************************/
- typedef struct /** contains info needed to specify each rot box window's contents **/
- {
- Boolean dirty;
- double xAngle;
- double yAngle;
- double zAngle;
- short paletteSetting;
- } WRObjs, **WRObjsHandle;
- /****************************************************/
- typedef struct /** used to calculate the size of **/
- /** the data written to a file **/
- {
- short vDocLimit;
- short hDocLimit;
- TPrint printInfo;
- short paletteSetting;
- objectDescr fileDataObject[MAX_OBJECTS]; /* objDescr */
- } fileDataRecord, *fileDataPtr;
- /****************************************************/
-
- typedef struct
- {
- objectDescr object[1];
- short type;
- Boolean hasBackGround;
- Boolean isArmed;
- short targets_left;
- short armament_type; /* 0 = guns, 1 = guns & missles, 2 = guns, missles & neutron bomb */
- short arms_selected; /* 0 = guns, 1 = missles, 2 = neutron bomb */
- Boolean hasTargets;
-
- } pred_data, prey_data, **PredDataHndl, **PreyDataHndl;
- /****************************************************/
-
-
- extern struct wTblStruct /* space for some window info */
- {
- WindowPtr windPtr; /* pointer to window record */
- WindowRecord windRec; /* window record */
- TEHandle windTEH[windTEHMax]; /* handles for TE items */
- short windTEHCount; /* how many handles are in use */
- short windTEHSub; /* subscript for active TE item */
- ControlHandle windCntlH[windCntlHMax]; /* handles to controls */
- short windCntlHSub; /* subscript for active control */
- short windCntlHCount; /* how many controls are in use */
- SFReply windReply; /* SF Reply associated with window */
- short windPathRefNum; /* Path reference number from open */
- Boolean windTEChanged; /* Data changed since previous save */
- }
- windTbl[windMax]; /* table of many of the above */
- extern short windSub; /* subscript for window table */
-
- /*****************************************************************/
- /* P R O T O T Y P E S
- /*****************************************************************/
-
-
-
- short one_of_mine (WindowPtr wPtr);
- void DeParse (void);
- void ClearFlags (void);
- void HandleButtonReg (
- struct regstrk *whichRegn,
- struct regstrk *whichReg0n
- );
- void ParseString (void);
- void cat_strings (
- char *str1, char *str2,
- unsigned long dest_max
- );
- void clip_4_palette (WindowPtr wPtr);
- void inval_object (WindowPtr wPtr, short index);
- void died (char desc[255], int code, int ref);
-
- #endif /* __C14__ */